package com.shilun.springboot.hello_demo.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.shilun.springboot.hello_demo.entity.User;

public interface UserMapper {
	
	@Select("select * from users where name=#{name}")
	User findUser(@Param("name") String name);
	
	@Insert("INSERT INTO USERS(NAME, AGE) VALUES(#{name}, #{age})")
	int createUser(@Param("name") String name, @Param("age") Integer age);
}
